package com.caption.design.mixture;

import org.springframework.stereotype.Component;

@Component
public class WeiXinPayHandler extends AbstractHandler implements Handler{

    @Override
    public void pay() {
        System.out.println("调用支付模块");
    }

    /**
     * 对象完成实例化之后放入到工厂当中
     * @throws Exception
     */
    @Override
    public void afterPropertiesSet() throws Exception {
        //对象实例化完成之后放入bean工厂
        PayFactory.register("WeiXin",this);
    }

}
